﻿using System;
using System.Net;
using System.Reflection;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace CaseMap {
    public class BagException : Exception {
        MethodBase mb;
        public BagException(string id)
            : base() {
            this.id = id;
        }
        public string id;
        object[] parameters;
        object trigger;
        public void Invoke() {
            this.mb.Invoke(trigger, parameters);
        }

        internal void Recoder(Map m, MethodBase mb, object[] p) {
            this.parameters = p;
            trigger = m;
            this.mb = mb;
        }
    }
}
